package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

const (
	version = "v1.0.0"
)

func Hello(w http.ResponseWriter, req *http.Request) {
	fmt.Println(*req)
	io.WriteString(w, fmt.Sprintf("this is httpbackendservice, version: %s\n", version))
}

func main() {
	http.HandleFunc("/", Hello)
	err := http.ListenAndServe(":8081", nil)
	if err != nil {
		log.Fatal("ListenAndServe: ", err)
	}
}
